<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>

<style type="text/css">
body {
	background-color: #f5f5f5;
}

.cashbox {
	background-color: white;
	position: relative;
}

.cashbottom {
	position: absolute;
	right: 5px;
	bottom: 10px;
	padding: 5px 5px;
}
.weui-cell:before{
	border-top: 0px;
}
.titlehidden {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	overflow: hidden;
}
</style>
<div>
	<c:if test="${empty policys}">
		<div class="weui-panel_body" style="text-align: center;">
			<img alt="" src="<c:url value='/images/we/personCenter/null.png' />">
			<p style="margin: 5px 20px; color: #afafaf">${msg}</p>
		</div>
	</c:if>
	<div style="height: 0.5rem"></div>
	<c:forEach items="${policys}" var="policy">
		<c:if test="${policy.signs=='fanhuaAccident'|| policy.signs=='zhonganAccident' }">
			<c:if test="${policy.insuState!='fail'}">
				<a href="<c:url value='/wechat/policy/listPolicy/policyDetail?oid=${policy.oid}&signs=${policy.signs}' />">
			</c:if>
			<c:if test="${policy.insuState=='fail'}">
				<a href="" />
			</c:if>
			<div style="margin: 0px 0.5rem; border: 2px solid #eee; border-radius: 8px;" class="cashbox">
				<div class="weui-cell">
					<div class="weui-cell__bd">
						<p style="width: 11rem;color:#444;" class="titlehidden">${policy.productName}&nbsp;</p>
					</div>
				</div>
				<div class="weui-cell">
					<div class="weui-cell__bd" style="color: #afafaf; font-size: 0.7rem">
						<c:if test="${policy.insuState=='ready'}">
							<p>
								保障日期：
								<fmt:formatDate value="${policy.startDate}" pattern="yyyy/MM/dd" />
								到&nbsp;
								<fmt:formatDate value="${policy.endDate}" pattern="yyyy/MM/dd" />
							</p>
						</c:if>
						<c:if test="${policy.insuState=='no'}">
							<p>
								结束日期：
								<fmt:formatDate value="${policy.endDate}" pattern="yyyy-MM-dd" />
							</p>
						</c:if>
						<c:if test="${policy.insuState=='yes'}">
							<p>
								保障日期：
								<fmt:formatDate value="${policy.startDate}" pattern="yyyy-MM-dd" />
								到&nbsp;
								<fmt:formatDate value="${policy.endDate}" pattern="yyyy-MM-dd" />
							</p>
						</c:if>

						<c:if test="${policy.insuState=='fail'}">
							<p>购买时间：
								<fmt:formatDate value="${policy.createDate}" pattern="yyyy-MM-dd HH:MM:ss" />
							</p>
							<p style="color: red">订单异常,请联系客服</p>
						</c:if>
					</div>
				</div>
				<div class="cashbottom">
					<c:if test="${policy.insuState=='ready'}">
						<img style="vertical-align: middle; width: 3rem; height: 3rem" src="<c:url value='/images/we/policy/insuReady.png'/>">
					</c:if>
					<c:if test="${policy.insuState=='no'}">
						<img style="vertical-align: middle; width: 3rem; height: 3rem" src="<c:url value='/images/we/policy/insuNoo.png'/>">
					</c:if>
					<c:if test="${policy.insuState=='yes'}">
						<img style="vertical-align: middle; width: 3rem; height: 3rem" src="<c:url value='/images/we/policy/insuYeso.png'/>">
					</c:if>
					<c:if test="${policy.insuState=='fail'}">
						<img style="vertical-align: middle; width: 3rem; height: 3rem" src="<c:url value='/images/we/policy/fail.png'/>">
					</c:if>
					<img style="vertical-align: middle; width: 8px; height: 15px;padding-left: 5px" src="<c:url value='/images/we/personCenter/icon_change.png'/>">
				</div>
			</div>
			<div style="height: 0.5rem"></div>
		</c:if>

		<c:if test="${policy.signs=='fanhuaCar'|| policy.signs=='zhonganCar'}">
			<a href="<c:url value='/wechat/policy/listPolicy/carPolicyDetail?oid=${policy.oid}&signs=${policy.signs}' />">

				<div style="margin: 0px 0.5rem; border: 2px solid #eee; border-radius: 8px;" class="cashbox">
					<div class="weui-cell">
						<div class="weui-cell__bd">
							<p>${policy.productName}&nbsp;</p>
						</div>
					</div>
					<div class="weui-cell">
						<div class="weui-cell__bd" style="color: #afafaf; font-size: 0.7rem">
							<c:if test="${policy.insuState=='ready'}">
								<p>
									保障日期：
									<fmt:formatDate value="${policy.startDate}" pattern="yyyy/MM/dd" />
									到&nbsp;
									<fmt:formatDate value="${policy.endDate}" pattern="yyyy/MM/dd" />
								</p>
							</c:if>
							<c:if test="${policy.insuState=='no'}">
								<p>
									结束日期：
									<fmt:formatDate value="${policy.endDate}" pattern="yyyy-MM-dd" />
								</p>
							</c:if>
							<c:if test="${policy.insuState=='yes'}">
								<p>
									保障日期：
									<fmt:formatDate value="${policy.startDate}" pattern="yyyy-MM-dd" />
									到&nbsp;
									<fmt:formatDate value="${policy.endDate}" pattern="yyyy-MM-dd" />
								</p>
							</c:if>
						</div>
					</div>
					<div class="cashbottom">
						<c:if test="${policy.insuState=='ready'}">
							<img style="vertical-align: middle; width: 3rem; height: 3rem" src="<c:url value='/images/we/policy/insuReady.png'/>">
						</c:if>
						<c:if test="${policy.insuState=='no'}">
							<img style="vertical-align: middle; width: 3rem; height: 3rem" src="<c:url value='/images/we/policy/insuNoo.png'/>">
						</c:if>
						<c:if test="${policy.insuState=='yes'}">
							<img style="vertical-align: middle; width: 3rem; height: 3rem" src="<c:url value='/images/we/policy/insuYeso.png'/>">
						</c:if>
						<c:if test="${policy.insuState=='fail'}">
							<img style="vertical-align: middle; width: 3rem; height: 3rem" src="<c:url value='/images/we/policy/fail.png'/>">
						</c:if>
						<img style="vertical-align: middle; width: 8px; height: 15px;padding-left: 5px" src="<c:url value='/images/we/personCenter/icon_change.png'/>">
					</div>
				</div>
			</a>
			<div style="height: 0.5rem"></div>
		</c:if>
	</c:forEach>
</div>

<script type="text/javascript">
	
</script>